\newproblem{lay:5_4_25}{
  % Problem identification
	\begin{large}
	  \hspace{\fill}\newline
    \textbf{Lay, 5.4.25}
	\end{large}
	\\
  \ifthenelse{\boolean{identifyAuthor}}{\textit{Carlos Oscar Sorzano, Aug. 31st, 2013} \\}{}

  % Problem statement
	The trace of a square matrix $A$ is the sum of the diagonal entries in $A$ and is denoted as $\mathrm{tr}\{A\}$. It can be verified that
	$\mathrm{tr}\{FG\}=\mathrm{tr}\{GF\}$ for any two $n\times n$ matrices $F$ and $G$. Show that if $A$ and $B$ are similar, then $\mathrm{tr}\{A\}=\mathrm{tr}\{B\}$.
}{
  % Solution
	If $A$ and $B$ are similar, then there exists an invertible matrix $P$ such that
	\begin{center}
		$B=PAP^{-1}$
	\end{center}
	Taking the trace of both sides
	\begin{center}
		$\begin{array}{rcll}
			\mathrm{tr}\{B\}&=&\mathrm{tr}\{PAP^{-1}\} & \\
			                &=&\mathrm{tr}\{P(AP^{-1})\} & \text{[by trace property]} \\
			                &=&\mathrm{tr}\{(AP^{-1})P\} &  \\
			                &=&\mathrm{tr}\{A(P^{-1}P)\} &  \\
			                &=&\mathrm{tr}\{A\} &  \\
		\end{array}$
	\end{center}
}
\useproblem{lay:5_4_25}
\ifthenelse{\boolean{eachProblemInOnePage}}{\newpage}{}
